---
title: .syncpackrc
sidebar:
  order: 1
---

Syncpack searches the current directory for a:

- `.syncpackrc` file with no extension in JSON format
- `.syncpackrc` file with the extension `.json`, `.yaml`, `.yml`, `.js`, `.ts`, `.mjs`, or `.cjs`
- `syncpack.config.js`, `syncpack.config.ts`, `syncpack.config.mjs`, or `syncpack.config.cjs` file
- `config.syncpack` or `syncpack` property in `package.json`.

A custom name and location can be provided instead, but it must have a file extension:

```bash
syncpack list --config ./config/syncpack.json
```

Your config file only needs to define values for those you want to change from the defaults.

## JSON

JSON is preferred as it is the fastest, without the overhead of calling out to Node.js and TypeScript.

```json title=".syncpackrc.json"
{
  "$schema": "./node_modules/syncpack/dist/schema.json",
  "indent": "    "
}
```

## TypeScript

```ts title=".syncpackrc.ts"
export default {
  indent: "    ",
} satisfies import("syncpack").RcFile;
```

## JavaScript

```js title=".syncpackrc.cjs"
// @ts-check

/** @type {import("syncpack").RcFile} */
const config = {
  indent: "    ",
};

module.exports = config;
```
